﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PolicyServer
{
    class Program
    {
        static void Main( string[] args )
        {
            PolicyServer policyServer = null;

            try
            {
                Console.WriteLine( "Starting policy server" );
                policyServer = new PolicyServer();
                policyServer.StartPolicyServer();
                Console.WriteLine( "Policy server successfully started" );
                Console.WriteLine( "Press any key to exit the server" );
                Console.ReadLine();
                policyServer.StopPolicyServer();
            }
            catch
            {
                if ( policyServer != null )
                    policyServer.StopPolicyServer();
            }
        }
    }
}
